<?php
/**
 * Created by PhpStorm.
 * Date: 2017/3/31
 * Time: 14:02
 */

namespace App\Http\Controllers\VipChannel\Charge\Transformers;

class ChargeInfoTransformer
{
    public function transform($item)
    {
        return [
            'phone' => $item->phone,
            'cost_total' => $item->cost_total,
            'start_day_count' => $item->start_day_count,
            'charge_amount_total' => $item->charge_amount_total,
            'created_at' => $item->created_at ? $item->created_at->toDateTimeString() : '',
            'charge_amount_yesterday' => $item->charge_amount_yesterday,
            'distribution_channel_id' => $item->distribution_channel_id,
            'arup_new_fans_last_month' => $item->arup_new_fans_last_month,
            'charge_cost_percent_total' => $item->charge_cost_percent_total,
            'charge_cost_percent_yesterday' => $item->charge_cost_percent_yesterday
        ];
    }
}